﻿/*
 
Celerity: Sensory Overload
Copright 2012 by Adam Hill, David Gannon, Thomas Tamblyn & Patrick Ytting
Contact: adam.hill@outlook.com
Website: adamhill.org
Licence: MS-Pl Licence
  
 */

using Celerity.Content;
using Celerity.Data;
using Celerity.Entities;
using Microsoft.Xna.Framework;
using System.Collections.Generic;

namespace Celerity.UI.Definition.Controls
{
    public class IconBombControl : UIEntity
    {
        public override void ConfigureSelf()
        {
            IsPressable = true;
            DrawCondition = new UIDrawCondition
            {
                CheckGameState = true,
                CheckedGameStates = new List<GameState>
                        {
                            GameState.InGame,
                            GameState.GameOver
                        }
            };
            Items = new List<UIEntityItem>
                    {
                        new UIEntityItem // Background
                        {
                            Size = this.Size + new Vector2(-25, 0),
                            Offset = this.Offset,
                            ImageDefault = ImageLibrary.TextureGrey,
                            ImagePressed = ImageLibrary.TextureGrey,
                        },
                        new UIEntityItem // Icon
                        {
                            Size = new Vector2(75, 75),
                            Offset = this.Offset + new Vector2(25, 25),
                            ImageDefault = ImageLibrary.IconBomb,
                            ImagePressed = ImageLibrary.IconBomb,
                            DrawCondition = new UIDrawCondition
                            {
                                CheckBombs = true,
                                MinBombs = 1
                            }
                        },
                        new UIEntityItem // Icon
                        {
                            Size = new Vector2(75, 75),
                            Offset = this.Offset + new Vector2(125, 25),
                            ImageDefault = ImageLibrary.IconBomb,
                            ImagePressed = ImageLibrary.IconBomb,
                            DrawCondition = new UIDrawCondition
                            {
                                CheckBombs = true,
                                MinBombs = 2
                            }
                        },
                        new UIEntityItem // Icon
                        {
                            Size = new Vector2(75, 75),
                            Offset = this.Offset + new Vector2(225, 25),
                            ImageDefault = ImageLibrary.IconBomb,
                            ImagePressed = ImageLibrary.IconBomb,
                            DrawCondition = new UIDrawCondition
                            {
                                CheckBombs = true,
                                MinBombs = 3
                            }
                        },



                        //new UIEntityItem // Back Text
                        //{
                        //    Size = this.Size,
                        //    Offset = this.Offset + UIGeometry.IconTextOffset,
                        //    Font = FontLibrary.Standard,
                        //    FontColorDefault = Palette.Black,
                        //    FontColorPressed = Palette.Accent,
                        //    Text = ResxText.Back,
                        //    ApplyCentring = true
                        //},
                    };
        }
    }
}
